package com.hdaccp.xingmu.controller;

import com.hdaccp.xingmu.dao.LvhuatypeDao;
import com.hdaccp.xingmu.entity.Lvhuatype;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.util.List;

@Controller
@RequestMapping("/lvhuatype")
public class LvhuatypeCon {


    @Autowired
    private LvhuatypeDao lvhuatypeDao;

    @PersistenceContext
    private EntityManager entityManager ;

    @RequestMapping("/baojietype")
    @ResponseBody
    public List<Lvhuatype> baojietype(){
        return lvhuatypeDao.findAll();
    }




}
